//
//  CustomTopAligmentLabel.m
//  DriftDog
//
//  Created by rimi on 15/9/14.
//  Copyright (c) 2015年 廖马林. All rights reserved.
//

#import "CustomTopAligmentLabel.h"

@implementation CustomTopAligmentLabel

-(void)drawTextInRect:(CGRect)rect {
    
    CGRect actualRect = [self textRectForBounds:rect limitedToNumberOfLines:self.numberOfLines];
    [super drawTextInRect:actualRect];
}

- (CGRect)textRectForBounds:(CGRect)bounds limitedToNumberOfLines:(NSInteger)numberOfLines {
    
    CGRect textRect = [super textRectForBounds:bounds limitedToNumberOfLines:numberOfLines];
    textRect.origin.y = bounds.origin.y;
    return textRect;
}

@end
